<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!doctype html>
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>编辑公告</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	
	<jsp:include page="/WEB-INF/views/common.jsp"></jsp:include>
	<link rel="stylesheet" href="<%=path%>/resources/kindeditor-4.1.10/themes/default/default.css" />
	<link rel="stylesheet" href="<%=path%>/resources/kindeditor-4.1.10/plugins/code/prettify.css" />
	<script charset="utf-8" src="<%=path%>/resources/kindeditor-4.1.10/kindeditor.js"></script>
	<script charset="utf-8" src="<%=path%>/resources/kindeditor-4.1.10/lang/zh_CN.js"></script>
	<script charset="utf-8" src="<%=path%>/resources/kindeditor-4.1.10/plugins/code/prettify.js"></script>
	<script type="text/javascript" src="<%=path%>/resources/script/noticeManage/noticeInfo_add.js"></script>
	<script>
		KindEditor.ready(function(K) {
			var editor1 = K.create('textarea[name="content"]', {
				cssPath : '<%=path%>/resources/kindeditor-4.1.10/plugins/code/prettify.css',
				uploadJson : '<%=path%>/resources/kindeditor-4.1.10/jsp/upload_json.jsp',
				fileManagerJson : '<%=path%>/resources/kindeditor-4.1.10/jsp/file_manager_json.jsp',
				allowFileManager : true,
				afterCreate : function() {
					var self = this;
					K.ctrl(document, 13, function() {
						self.sync();
						document.forms['example'].submit();
					});
					K.ctrl(self.edit.doc, 13, function() {
						self.sync();
						document.forms['example'].submit();
					});
				}, 
		        afterBlur:function(){ 
		            this.sync(); 
		        }  
			});
			prettyPrint();
		});
	</script>
  </head>
  
  <body>
    
    <div class="easyui-layout" fit="true">
   		<div region="center" border="false" style="padding: 10px; background: #fff; border: 1px solid #ccc;">
		<form id="form" method="post">
			<input id="id" name="id" type="hidden" value="${notice.id }" />
			<%-- <input id="authorityIdsStr" name="authorityIdsStr" type="hidden" value="${role.authorityIdsStr }" /> --%>
			<table>
				<tr>
					<td>公告名称：</td>
					<td>
						<input id="title" name="title" value="${notice.title }" class="easyui-validatebox" required="true" missingMessage="公告名称不能为空"  tipPosition="bottom" style="width: 200px;" />
					</td>
				</tr>
				<tr>
					<th>公告类型：</th>
					<td>
						<select id="type" class="easyui-combobox" name="type" style="width:200px;">
							<option>学院公告</option>
							<option>系统消息</option>
						</select>
					</td>
				</tr>
				<tr>
					<th>公告内容：</th>
					<td>
						<textarea id="content" name="content" cols="100" rows="8" style="width:500px;height:300px">${notice.content }</textarea>
					</td>
				</tr>
			</table> 
		</form>
   		</div>
   		<div region="south" border="false" style="text-align: right; height: 35px; line-height: 8px; padding:5px 5px 0 0;">
   			<a id="btnSave" class="easyui-linkbutton" icon="icon-ok" href="javascript:void(0);">确定</a>
   			<a id="btnCancel" class="easyui-linkbutton" icon="icon-cancel" href="javascript:void(0);">取消</a>
   		</div>
   	</div>
    
  </body>
</html>
